<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双向绑定单选按钮</title>
</head>
<body>
<div id="app">
    <div>
        性别：
        <label>
            <input type="radio" name="gender"  value="男" v-model="gender">男
        </label>
        <label>
            <input type="radio" name="gender" value="女" v-model="gender">女
        </label>

        <h2>当前选中的是：{{ gender }}</h2>
    </div>
</div>
<script type="module">
    import {createApp, ref} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
            setup() {
                let gender = ref(null)
                return {
                    gender,
                }
            }
        }
    )

    app.mount("#app")
</script>
</body>
</html>